package kuaidi.model.impl;

import java.util.Map;

import kuaidi.api.RetroManager;
import kuaidi.api.services.ChakuaidiService;
import kuaidi.entity.kuaidijieguo.Kdjg;
import kuaidi.model.models.IKuaidiModel;
import rx.Subscriber;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;

/**
 * Created by John on 2016/11/1.
 */

public class KuaidiImpl implements IKuaidiModel{
    @Override
    public void getKdjgData(Map<String, String> parmas, Subscriber<Kdjg> subscriber) {
        RetroManager.getInstance(ChakuaidiService.BASE_URL)
                .getChaxunkuaidiService()
                .getKdjgData(parmas)
                .observeOn(AndroidSchedulers.mainThread())
                .subscribeOn(Schedulers.io())
                .subscribe(subscriber);
    }
}
